<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>concat</title>
</head>

<body>
    <script>
        function myConcat(...items) {
            for (let i = 0; i < items.length; i++) {
                for (let j = 0; j < items[i].length; j++) {
                    this[this.length] = items[i][j]
                }
            }
            return this
        }
        Array.prototype.myConcat = myConcat;
        let arr = [1, 2, 3];
        let newArr = [4, 5, 6];
        let newArr2 = [7, 8, 9]
        let result = arr.myConcat(newArr, newArr2);
        console.log(result);

    </script>
</body>



</html>